diff options
| author | Adam Soltys <[email protected]> | 2026-02-11 20:10:43 -0800 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-02-11 20:10:43 -0800 |
| commit | 56a04684c1fb77ea7b21afc6b0d2e1c4773906f6 (patch) | |
| tree | d6bc2557c56b93177bb14aa376847c6e123a4862 /src/routes/(app)/invoice/[id]/tip | |
| parent | 13466248004327e9a026cb89f94926f9b060d1c1 (diff) | |
| download | coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.tar.gz coinos-ui-56a04684c1fb77ea7b21afc6b0d2e1c4773906f6.zip | |
format
Diffstat (limited to 'src/routes/(app)/invoice/[id]/tip')
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.server.ts | 6 | ||||
| -rw-r--r-- | src/routes/(app)/invoice/[id]/tip/+page.svelte | 26 |
2 files changed, 7 insertions, 25 deletions
diff --git a/src/routes/(app)/invoice/[id]/tip/+page.server.ts b/src/routes/(app)/invoice/[id]/tip/+page.server.ts index 16cc22fa..91ccebca 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.server.ts +++ b/src/routes/(app)/invoice/[id]/tip/+page.server.ts @@ -44,11 +44,7 @@ export const actions = { tip: form.tip ?? null, }; - const { id } = await post( - `/invoice/${form.id}`, - { invoice }, - auth(cookies), - ); + const { id } = await post(`/invoice/${form.id}`, { invoice }, auth(cookies)); redirect(307, `/invoice/${id}`); }, diff --git a/src/routes/(app)/invoice/[id]/tip/+page.svelte b/src/routes/(app)/invoice/[id]/tip/+page.svelte index 1183093e..32ba78a2 100644 --- a/src/routes/(app)/invoice/[id]/tip/+page.svelte +++ b/src/routes/(app)/invoice/[id]/tip/+page.svelte @@ -107,18 +107,13 @@ <div> <span class="mr-1"> {f(amountFiat, currency, locale)} - <span class="font-semibold" - >+{f(tipAmount, currency, locale)}</span - > + <span class="font-semibold">+{f(tipAmount, currency, locale)}</span> </span> </div> {:else} <div class="ml-auto text-lg flex gap-2"> <div class="flex items-center"> - <iconify-icon - noobserver - icon="ph:lightning-fill" - class="text-yellow-300" + <iconify-icon noobserver icon="ph:lightning-fill" class="text-yellow-300" ></iconify-icon> <div>{s(amount, locale)}</div> </div> @@ -134,12 +129,8 @@ <div class="space-y-2"> {#if tip} - <button type="button" class="btn" onclick={() => submit.click()} - >Next</button - > - <button type="button" class="btn" onclick={() => (tipPercent = 0)} - >Reset</button - > + <button type="button" class="btn" onclick={() => submit.click()}>Next</button> + <button type="button" class="btn" onclick={() => (tipPercent = 0)}>Reset</button> {:else} {#each tipAmounts as amount, i} {#if i === 0} @@ -163,10 +154,7 @@ </div> <div class="space-y-2"> - <button - type="button" - class="btn" - onclick={() => (showCustomAmount = true)} + <button type="button" class="btn" onclick={() => (showCustomAmount = true)} >{$t("payments.custom")}</button > <a href={`/invoice/${id}`} class="btn">{$t("payments.cancel")}</a> @@ -186,9 +174,7 @@ placeholder={$t("payments.amount")} use:focus /> - <button type="submit" class="btn" disabled={!customTipAmount} - >Apply</button - > + <button type="submit" class="btn" disabled={!customTipAmount}>Apply</button> </form> {/if} </div> |
